package com.ruoyi.project.jiaqin.thrclasstrend.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.jiaqin.thrclasstrend.mapper.ThrClassTrendMapper;
import com.ruoyi.project.jiaqin.thrclasstrend.domain.ThrClassTrend;
import com.ruoyi.project.jiaqin.thrclasstrend.service.IThrClassTrendService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 三级分类价格走势Service业务层处理
 *
 * @author admin
 * @date 2021-01-09
 */
@Service
public class ThrClassTrendServiceImpl implements IThrClassTrendService
{
    @Autowired
    private ThrClassTrendMapper thrClassTrendMapper;

    /**
     * 查询三级分类价格走势
     *
     * @param id 三级分类价格走势ID
     * @return 三级分类价格走势
     */
    @Override
    public ThrClassTrend selectThrClassTrendById(String id)
    {
        return thrClassTrendMapper.selectThrClassTrendById(id);
    }

    /**
     * 查询三级分类价格走势列表
     *
     * @param thrClassTrend 三级分类价格走势
     * @return 三级分类价格走势
     */
    @Override
    public List<ThrClassTrend> selectThrClassTrendList(ThrClassTrend thrClassTrend)
    {
        return thrClassTrendMapper.selectThrClassTrendList(thrClassTrend);
    }

    @Override
    public List<ThrClassTrend> selectThrClassTrendByTwoClassId(String twoClassId) {
        return thrClassTrendMapper.selectThrClassTrendByTwoClassId(twoClassId);
    }

    @Override
    public Integer selectNowStatusByThrClassId(String thrClassId) {
        return thrClassTrendMapper.selectNowStatusByThrClassId(thrClassId);
    }

    @Override
    public List<ThrClassTrend> selectThrClassTrendMonthDayByThrClassId(String thrClassId) {
        return thrClassTrendMapper.selectThrClassTrendMonthDayByThrClassId(thrClassId);
    }

    @Override
    public List<ThrClassTrend> selectThrClassTrendSevenDayByThrClassId(String thrClassId) {
        return thrClassTrendMapper.selectThrClassTrendSevenDayByThrClassId(thrClassId);
    }

    /**
     * 新增三级分类价格走势
     *
     * @param thrClassTrend 三级分类价格走势
     * @return 结果
     */
    @Override
    public int insertThrClassTrend(ThrClassTrend thrClassTrend)
    {
        return thrClassTrendMapper.insertThrClassTrend(thrClassTrend);
    }

    /**
     * 修改三级分类价格走势
     *
     * @param thrClassTrend 三级分类价格走势
     * @return 结果
     */
    @Override
    public int updateThrClassTrend(ThrClassTrend thrClassTrend)
    {
        return thrClassTrendMapper.updateThrClassTrend(thrClassTrend);
    }

    /**
     * 删除三级分类价格走势对象
     *
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteThrClassTrendByIds(String ids)
    {
        return thrClassTrendMapper.deleteThrClassTrendByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除三级分类价格走势信息
     *
     * @param id 三级分类价格走势ID
     * @return 结果
     */
    @Override
    public int deleteThrClassTrendById(String id)
    {
        return thrClassTrendMapper.deleteThrClassTrendById(id);
    }
}
